<?php 
	echo $javascript->link('funciones'); 
?>
<div id="infotorres">
	<?php if(!empty($torres)): ?>
		<table class="tablasmetodospagos">
			<tr style='text-align:center'>
				<td class='tdlabeltipopago'>Nombre Torre</td>
				<td class='tdlabeltipopagopago'>Acci&oacute;n</td>
			</tr>
			<?php foreach($torres as $torre): ?>
				<?php
					echo "<tr style='text-align:center'>";
					echo "<td class='trleftmetodopago' id='".$torre['Direccione']['id']."'>".$torre['Direccione']['torre']."</td>";
					echo "<td class='tdrightmetodopago'>";
						echo "<select id='".$torre['Direccione']['id']."' name='activadostorres[]' class='boxmetodo'>";
									if ($torre['Direccione']['activo']==1){
										echo "<option value='1'>&nbsp&nbsp Activado &nbsp&nbsp</option>";
										echo "<option value='0'> Desactivado </option>";
										echo "</select>";
									}
									else{
										echo "<option value='0'> Desactivado </option>";
										echo "<option value='1'>&nbsp&nbsp Activado &nbsp&nbsp</option>";
										echo "</select>";
									}
						echo "</td>";
					echo "</tr>";
					echo "<input type='hidden' value='".$torre['Direccione']['id']."'/>";
				?>
				
			<?php endforeach;?>
		</table>
		<div class="salvarmetodos">
				<?php echo $form->button('Salvar',array('class'=>'salvarmodifmetodos','id'=>'salvartorres'));?>
		</div>
	<?php endif; ?>
	</div>